<?php

namespace Constructor;

abstract class Exception extends \Exception
{
    public $originalMessage;
    public function __construct( $message )
    {
        $this->originalMessage = $message;
        
        if( php_sapi_name() === 'cli' )
        {
            parent::__construct( $message );
        }
        else
        {
            parent::__construct( htmlspecialchars( $message ) );
        }
    }
}
